import request from '@/utils/request'

const apiName = '/admin/user/userInfo'
export default {

  //用户列表
  getPageList(page, limit, searchObj) {
    return request({
      url: `${apiName}/${page}/${limit}`,
      method: 'get',
      params: searchObj
    })
  },

  //锁定与解锁
  lock(id, status) {
    return request({
      url: `${apiName}/lock/${id}/${status}`,
      method: 'put'
    })
  },

  //用户详情
  show(id) {
    return request({
      url: `${apiName}/show/${id}`,
      method: 'get'
    })
  },

  //认证审批
  approval(id, authStatus) {
    return request({
      url: `${apiName}/approval/${id}/${authStatus}`,
      method: 'put'
    })
  }
}